<?php
	$hostname_conn = "localhost";
	$database_conn = "xdq";
	$username_conn = "root";//没改的话一般时root
	$password_conn = "123456";
	//连接MYSQL数据库
	$conn = mysqli_connect($hostname_conn, $username_conn, $password_conn,$database_conn)or trigger_error(mysqli_error(),E_USER_ERROR);
	mysqli_query($conn,"set names 'utf8mb4'");


if (!$conn){
	die('Could not connect: ' . mysql_error());
}else{
	echo "sucessly";
}
$userid=6; $lessonid=6;$slesson=6;$sclass=6;$setTime=2020/10/17/2/23;
$sql1 = "insert into addLesson values ('$userid','$lessonid','$slesson','$sclass','$setTime')";
$test=mysqli_query($conn, $sql1);
if($test){
	echo "good";
}else{
	echo "fail";
}

?>
